<el-dialog :close-on-click-modal="false"  :close-on-press-escape="false"  class="dialogStyleBase" :title="mixinEdit_editTitle" width="500px" :visible.sync="mixinEdit_editVisible"
    :before-close="function(){mixinEdit_editBoxClose('editForm')}" append-to-body>
    <div class="dialogStyleBaseBox" v-loading="mixinEdit_loading">
        <el-form ref="editForm" :model="form" label-width="100px" label-position="left">

            <el-form-item label="手机号" prop="mobile"
                :rules="[{trigger: ['blur', 'change'] , required:true,validator: $vFN.Tools.validatePhone}]">
                <el-input  v-model="form.mobile" maxlength="11" show-word-limit>
                </el-input>
            </el-form-item>
            <el-form-item label="真实姓名" prop="real_name" :rules="{ required: true, message: '姓名不能为空'}">
                <el-input v-model="form.real_name" maxlength="20" show-word-limit></el-input>
            </el-form-item>
            <el-form-item label="用户名" prop="username" :rules="{ required: true, message: '用户名不能为空'}">
                <el-input v-model="form.username" maxlength="20" show-word-limit></el-input>
            </el-form-item>
            <el-form-item label="密码" prop="password" v-if="mixinEdit_editType == 'add'" :rules="[{trigger: ['blur', 'change'] , required:true,validator: $vFN.Tools.validatePassword}]">
                <el-input v-model="form.password" maxlength="20" show-password></el-input>
            </el-form-item> 
            <el-form-item label="密码" prop="password" v-if="mixinEdit_editType == 'update'">
                <el-input v-model="form.password" maxlength="20" show-password></el-input>
            </el-form-item> 
            <el-form-item label="选择角色" prop="role_id" :rules="{ required: this.mixinEdit_editType == 'add', message: '请选择角色'}">
                <el-select v-model="form.role_name" placeholder="请选择" style="width:100%" @change="selectRole">
                    <el-option v-for="item in listCanAuthRole" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select>
            </el-form-item>

        </el-form>
    </div>
    <div slot="footer">
        <el-row>
            <el-col :span="12" style="text-align: left;">
                <el-button :disabled="mixinEdit_loading" @click="mixinEdit_resetForm('editForm')">重 置</el-button>
            </el-col>
            <el-col :span="12">
                <el-button :disabled="mixinEdit_loading" @click="mixinEdit_editBoxClose('editForm')">取 消</el-button>
                <el-button :disabled="mixinEdit_loading" type="primary"
                    @click="mixinEdit_editFormSubmit({model:'form',ref:'editForm'})">确
                    定</el-button>
            </el-col>
        </el-row>
    </div>
</el-dialog>